﻿{extend name="$_tpl_public_layout_danceadmin"/}


{block name="breadcrumb"}
<ol class="breadcrumb">
	<li class="breadcrumb-item"><a href="{:url('admin/index/index')}">{:config('system.site_title')}</a></li>
	<li class="breadcrumb-item"><a href="{:url('admin/config/index')}">{$sideName}</a></li>
</ol>
{/block}


{block name="pageheader"}
{$sideName}
{/block}


{block name="content"}
<div class="btn-group btn-group-toggle daui-btn-group daui-btn-group-orange mb-3">
	<a href="{:url('admin/config/index')}" class="btn btn-outline-lightgrey active">
		系统配置
		<span class="daui-btn-group-badge"></span>
	</a>
	<a href="{:url('admin/agreement/index')}" class="btn btn-outline-lightgrey">
		服务协议
		<span class="daui-btn-group-badge"></span>
	</a>
	<a href="{:url('admin/privacypolicy/index')}" class="btn btn-outline-lightgrey">
		隐私政策
		<span class="daui-btn-group-badge"></span>
	</a>
	<a href="{:url('admin/aboutus/index')}" class="btn btn-outline-lightgrey">
		关于我们
		<span class="daui-btn-group-badge"></span>
	</a>
	<a href="{:url('admin/companyintro/index')}" class="btn btn-outline-lightgrey">
		公司介绍
		<span class="daui-btn-group-badge"></span>
	</a>
</div>

<div class="card card-noborder">
	<div class="card-body">
		<form method="post" action="{:url('admin/config/doSet')}" enctype="multipart/form-data" class="form-horizontal J_ajaxForm">
			<h3 class="form-lighter">基本信息</h3>
			<div class="form-group row">
				<label class="col-sm-2 control-label">站点名称</label>
				<div class="col-sm-5">
					<input type="text" name="data[site_title]" value="{$info['site_title']}" class="form-control" />
				</div>
				<div class="col-sm-5"></div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">简短名称</label>
				<div class="col-sm-5">
					<input type="text" name="data[simple_title]" value="{$info['simple_title']}" class="form-control" />
				</div>
				<div class="col-sm-5"></div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">网站域名</label>
				<div class="col-sm-5">
					<input type="text" name="data[site_domain]" value="{$info['site_domain']}" class="form-control" />
				</div>
				<div class="col-sm-5 help-block">填写您站点的完整域名。例如: http://www.uucms.com，不要以斜杠 (“/”) 结尾</div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">分享域名</label>
				<div class="col-sm-5">
					<input type="text" name="data[site_share_domain]" value="{$info['site_share_domain']}" class="form-control" />
				</div>
				<div class="col-sm-5"></div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">分享安全域名</label>
				<div class="col-sm-5">
					<input type="text" name="data[site_https_domain]" value="{$info['site_https_domain']}" class="form-control" />
				</div>
				<div class="col-sm-5"></div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">备案号</label>
				<div class="col-sm-5">
					<input type="text" name="data[site_icp]" value="{$info['site_icp']}" class="form-control" />
				</div>
				<div class="col-sm-5"></div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">站点开关</label>
				<div class="col-sm-5">
					<?php echo isOpenRadioHtmlB('data[toggle_web_site]', $info['toggle_web_site']); ?>
				</div>
				<div class="col-sm-5"></div>
			</div>
			<h3 class="form-lighter">SEO信息</h3>
			<div class="form-group row">
				<label class="col-sm-2 control-label">标题</label>
				<div class="col-sm-5">
					<input type="text" name="data[site_seo_title]" value="{$info['site_seo_title']}" class="form-control" placeholder="DancePHP快速开发框架" />
				</div>
				<div class="col-sm-5"></div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">关键词</label>
				<div class="col-sm-5">
					<input type="text" name="data[site_seo_keywords]" value="{$info['site_seo_keywords']}" class="form-control" placeholder="开源框架 DancePHP ThinkPHP" />
				</div>
				<div class="col-sm-5"></div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">描述</label>
				<div class="col-sm-5">
					<input type="text" name="data[site_seo_description]" value="{$info['site_seo_description']}" class="form-control" placeholder="dancePHP是一款基于ThinkPHP5+Bootstrap的极速开发框架" />
				</div>
				<div class="col-sm-5"></div>
			</div>
			<h3 class="form-lighter">公司相关</h3>
			<div class="form-group row">
				<label class="col-sm-2 control-label">公司名称</label>
				<div class="col-sm-5">
					<input type="text" name="data[comp_name]" value="{$info['comp_name']}" class="form-control" />
				</div>
				<div class="col-sm-5"></div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">公司地址</label>
				<div class="col-sm-5">
					<input type="text" name="data[comp_address]" value="{$info['comp_address']}" class="form-control" />
				</div>
				<div class="col-sm-5"></div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">工作时间</label>
				<div class="col-sm-5">
					<input type="text" name="data[comp_time]" value="{$info['comp_time']}" class="form-control" />
				</div>
				<div class="col-sm-5"></div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">公司电话</label>
				<div class="col-sm-5">
					<input type="text" name="data[comp_tel]" value="{$info['comp_tel']}" class="form-control" />
				</div>
				<div class="col-sm-5"></div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">公司邮箱</label>
				<div class="col-sm-5">
					<input type="text" name="data[comp_email]" value="{$info['comp_email']}" class="form-control" />
				</div>
				<div class="col-sm-5"></div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">平台二维码</label>
				<div class="col-sm-5">
					<div class="daui-filebox J_filebox">
						<input type="file" name="comp_ewm" class="daui-filebox__file" />
						<div class="daui-filebox__hd">
							<div class="daui-filebox__control">
								选择文件
							</div>
							<div class="daui-filebox__name"></div>
						</div>
						<div class="daui-filebox__bd">
							<img src="{$info['comp_ewm']}" onerror="Javascript:this.src='/static/danceAdmin/images/nopic.png';" />
						</div>
						<div class="daui-filebox__del">
							<label><input type="checkbox" name="comp_ewm_del" value="1">删除图片</label>
						</div>
					</div>
				</div>
				<div class="col-sm-5 help-block">大小2M以下,建议尺寸640×640px(不做压缩处理)</div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">版权信息</label>
				<div class="col-sm-5">
					<input type="text" name="data[copyright]" value="{$info['copyright']}" class="form-control" />
				</div>
				<div class="col-sm-5 help-block">推荐输入您的公司名称</div>
			</div>
			<h3 class="form-lighter">客服信息</h3>
			<div class="form-group row">
				<label class="col-sm-2 control-label">客服电话</label>
				<div class="col-sm-5">
					<input type="text" name="data[kefu_tel]" value="{$info['kefu_tel']}" class="form-control" />
				</div>
				<div class="col-sm-5"></div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">客服手机</label>
				<div class="col-sm-5">
					<input type="text" name="data[kefu_phone]" value="{$info['kefu_phone']}" class="form-control" />
				</div>
				<div class="col-sm-5"></div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">客服微信</label>
				<div class="col-sm-5">
					<input type="text" name="data[kefu_wxnumber]" value="{$info['kefu_wxnumber']}" class="form-control" />
				</div>
				<div class="col-sm-5"></div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">客服QQ</label>
				<div class="col-sm-5">
					<input type="text" name="data[kefu_qqnumber]" value="{$info['kefu_qqnumber']}" class="form-control" />
				</div>
				<div class="col-sm-5"></div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">客服描述</label>
				<div class="col-sm-5">
					<input type="text" name="data[kefu_desc]" value="{$info['kefu_desc']}" class="form-control" />
				</div>
				<div class="col-sm-5"></div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">客服微信二维码</label>
				<div class="col-sm-5">
					<div class="daui-filebox J_filebox">
						<input type="file" name="kefu_ewm" class="daui-filebox__file" />
						<div class="daui-filebox__hd">
							<div class="daui-filebox__control">
								选择文件
							</div>
							<div class="daui-filebox__name"></div>
						</div>
						<div class="daui-filebox__bd">
							<img src="{$info['kefu_ewm']}" onerror="Javascript:this.src='/static/danceAdmin/images/nopic.png';" />
						</div>
						<div class="daui-filebox__del">
							<label><input type="checkbox" name="kefu_ewm_del" value="1">删除图片</label>
						</div>
					</div>
				</div>
				<div class="col-sm-5 help-block">大小2M以下,建议尺寸640×640px(不做压缩处理)</div>
			</div>
			<h3 class="form-lighter">分享相关</h3>
			<div class="form-group row">
				<label class="col-sm-2 control-label">分享标题</label>
				<div class="col-sm-5">
					<input type="text" name="data[share_title]" value="{$info['share_title']}" class="form-control" />
				</div>
				<div class="col-sm-5 help-block">如果未设置分享标题，则默认使用商品名称</div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">分享描述</label>
				<div class="col-sm-5">
					<input type="text" name="data[share_desc]" value="{$info['share_desc']}" class="form-control" />
				</div>
				<div class="col-sm-5"></div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">分享图标</label>
				<div class="col-sm-5">
					<div class="daui-filebox J_filebox">
						<input type="file" name="share_icon" class="daui-filebox__file" />
						<div class="daui-filebox__hd">
							<div class="daui-filebox__control">
								选择文件
							</div>
							<div class="daui-filebox__name"></div>
						</div>
						<div class="daui-filebox__bd">
							<img src="{:config('app.ftp_web')}{$info['share_icon']}" onerror="Javascript:this.src='/static/danceAdmin/images/nopic.png';" />
						</div>
						<div class="daui-filebox__del">
							<label><input type="checkbox" name="kefu_ewm_del" value="1">删除图片</label>
						</div>
					</div>
				</div>
				<div class="col-sm-5 help-block">大小2M以下,建议尺寸240×240px(不做压缩处理)</div>
			</div>
			<h3 class="form-lighter">功能相关</h3>
			<div class="form-group row">
				<label class="col-sm-2 control-label">授权服务号</label>
				<div class="col-sm-5">
					<?php echo optionRadioHtmlB($weixinAccountList, 'data[authorize_wid]', $info['authorize_wid'], 'wxname', 'id'); ?>
				</div>
				<div class="col-sm-5"></div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">默认小程序</label>
				<div class="col-sm-5">
					<?php echo optionRadioHtmlB($weixinAppletList, 'data[weixin_appletid]', $info['weixin_appletid'], 'wxname', 'id'); ?>
				</div>
				<div class="col-sm-5"></div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">高并发锁方式</label>
				<div class="col-sm-5">
					<label class="radio-inline">
						<input type="radio" name="data[lock_type]" value="db" {$info['lock_type'] == 'db' ? 'checked' : ''}> 数据锁
					</label>
					<label class="radio-inline">
						<input type="radio" name="data[lock_type]" value="transaction" {$info['lock_type'] == 'transaction' ? 'checked' : ''}> 事务锁
					</label>
					<label class="radio-inline">
						<input type="radio" name="data[lock_type]" value="redis" {$info['lock_type'] == 'redis' ? 'checked' : ''}> redis锁
					</label>
				</div>
				<div class="col-sm-5 help-block">
					数据锁：要求不高的场景下可以用。
					<br>事务锁：基本废弃。会存在一些问题，比如订单商品入库，但是订单被回滚。
					<br>redis锁：适合秒杀等高并发场景使用，需要服务器支持redis
				</div>
			</div>
			<div class="clearfix form-actions">
				<div class="offset-md-2 col-sm-10">
					<button type="submit" class="btn btn-primary btn-sm J_ajaxSubmit">保存</button>
				</div>
			</div>
		</form>
	</div>
</div>
{/block}


{block name="script"}
<!-- 上传图片展示 -->
<script type="text/javascript" src="__STATIC__/dancewidgets/uploadPreview/uploadPreview.js"></script>

{/block}